package com.yangmf.auto_message_handle.pojo.entity;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.time.LocalDateTime;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.LinkedBlockingQueue;

@Component
@Slf4j
public class DataBlocking {
    @Autowired
    private DataManager dataManager;

    private final BlockingQueue<Imageurl> dataMap = new LinkedBlockingQueue<>();

    public void addData(String Imgurl, Integer Message_id){
        log.info("添加图片数据");
        dataMap.add(new Imageurl(Imgurl, LocalDateTime.now(),0,Message_id));

    }

    public BlockingQueue<Imageurl> getData(){
        return dataMap;
    }



}
